package com.mofang.ticketing.user.serve.account.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author LGC
 * @date 2022/5/19 20:01
 */
@Data
@ApiModel(value = "账号基本信息修改")
public class AccountBaseInfoUpdateReqDTO implements Serializable {
    private static final long serialVersionUID = -1270879140086081514L;

    /**
     * 用户名
     */
    @NotBlank(message = "姓名不能为空")
    @Size(max = 50, message = "姓名最大50字符")
    @ApiModelProperty(value = "姓名", required = true)
    private String username;

    /**
     * 原密码
     */
    @NotBlank(message = "原密码不能为空")
    @Pattern(regexp = "^[A-Za-z0-9]{6,180}$", message = "原密码只能输入英文、数字6-180位")
    @ApiModelProperty(value = "原密码", required = true)
    private String oldPassword;

    /**
     * 新密码
     */
    @NotBlank(message = "新密码不能为空")
    @Pattern(regexp = "^[A-Za-z0-9]{6,180}$", message = "新密码只能输入英文、数字5-180位")
    @ApiModelProperty(value = "新密码", required = true)
    private String newPassword;

}